# -*- coding: utf-8 -*-
"""
Created on Mon Sep 20 11:15:50 2021

@author: 刘长奇-2019300677
"""
import numpy as np
import matplotlib.pyplot as plt
x_data=np.linspace(0,1000,250)
y_data=np.random.randint(-1,2,250)
y=np.zeros((250))
y[0]=y_data[0]
for i in range(1,250):
    y[i]=y[i-1]+y_data[i]
plt.plot(x_data,y,label='walk')
plt.title('walk')
plt.xlabel('x')
plt.ylabel('y')
plt.legend(loc='upper right')

plt.show()

